package org.example.service;

import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * 降级工厂
 */
@Component
public class TestFallBackFactory implements FallbackFactory<TestOpenFeign> {
    @Override
    public TestOpenFeign create(Throwable cause) {

        return new TestOpenFeign() {
            @Override
            public String testOpenFeign() {
                return "ERROR---Factory";
            }
        };
    }
}
